package cn.ztuo.bitrade.dao;

import cn.ztuo.bitrade.dao.base.BaseDao;
import cn.ztuo.bitrade.entity.EarningsTreasure;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface EarningsTreasureDao extends BaseDao<EarningsTreasure> {

    EarningsTreasure findById(Long id);

    @Query(value = "select * from earnings_treasure where status in (0,1,2) order by create_time DESC",nativeQuery = true)
    List<EarningsTreasure> findAllByStatus();
}
